package com.neuqsoft.ymtdemo.utils;

import java.util.HashMap;

/**
 * <pre>
 *     author : wulh
 *     e-mail : wulh@neuqsoft.com
 *     time   : 2021/02/01
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class UrlUtils {
    public static HashMap<String, String> getUrlParams(String url) {
        int index = url.indexOf("?");
        String argStr = url.substring(index + 1);
        String[] argAry = argStr.split("&");
        HashMap<String, String> argMap = new HashMap<>();
        for (String arg : argAry) {
            String[] argAryT = arg.split("=");
            argMap.put(argAryT[0], argAryT[1]);
        }
        return argMap;
    }

}
